LEAF API Documentation
Path Parameters
ParameterDescription
membership 

Get Membership Details GET

Obtains the details associated with a specific LEAF charity membership

Parameters

Response Parameters
ParameterNameTypeDescription
MembershipGUIDMembership IdentifierStringThe unique identifier for the membership
CharityNumberLEAF Charity NumberStringThe charity number assigned to the membership
MembershipTypeMembership TypeEnumerationThe type of membership
MembershipNameMembership NameString (Optional)The name of the farm, company, organisation or individual associated with the membership
AddressAddressString (Optional)The postal address of the membership
PostcodePostcodeString (Optional)The postcode for the membership
CountryCountryString (Optional)The country of the membership
DateJoinedDate JoinedDate / Time (Optional)The date on which the member joined LEAF
NextRenewalNext RenewalDate / Time (Optional)The date on which the member's next renewal is due
EMailEMail AddressString (Optional)The email address for the membership
PhoneTelephone NumberString (Optional)The telephone number for the membership
ProducerGroupSizeProducer Group SizeNumber (Optional)If the membership is a producer group, the number of producers of which it is comprised
HoldingNumberCPH (Holding) NumberString (Optional)The holding number for the membership
TotalProductionAreaTotal Production AreaNumber (Optional)The total production area for the membership
FarmTypeFarm TypeEnumeration (Optional)The farm type for the membership
LeafMarqueEquivalenceSchemeNameEquivalence Scheme NameString (Optional)The name of the LEAF Marque equivalence scheme for this membership
LeafMarqueEquivalenceSchemeNumberEquivalence Scheme NumberString (Optional)The LEAF Marque equivalence scheme number for this membership
LeafMarqueBaselineSchemeNameBaseline Scheme NameString (Optional)The name of the LEAF Marque baseline scheme for this membership
LeafMarqueBaselineSchemeNumberBaseline Scheme NumberString (Optional)The LEAF Marque baseline scheme number for this membership
LeafMarqueNumberLEAF Marque NumberString (Optional)The LEAF Marque number for this membership
LeafMarqueMembershipStatusLEAF Marque Membership StatusEnumeration (Optional)The LEAF Marque membership status for this membership
LeafMarqueCertificationBodyNameLEAF Marque Certification Body NameString (Optional)The name of the LEAF Marque Certification Body for this membership
LsfrAccessLSFR AccessBoolean (Optional)Specifies whether the membership currently qualifies for access to the LSFR
LsfrClientGroupsLSFR Client Group AssignmentsList (Optional)The list of assigned LSFR Client Groups for this membership
ClientGroupName
Client Group NameString (Optional)The name for the client group.
ClientGroupIdentifier
Client Group IdentifierString (Optional)The unique identifier for the client group.

Enumerations

Membership Type (Response)
ValueDescription
Please SelectPlease Select
Individual MemberIndividual Member
Corporate MemberCorporate Member
College MemberCollege Member
Advisor or ConsultantAdvisor or Consultant
Producer GroupProducer Group
Non-Paying AgentNon-Paying Agent
Green Box SubscriberGreen Box Subscriber
FriendFriend
IndustryIndustry
Non-MemberNon-Member
LEAF Marque buyers and sellersLEAF Marque buyers and sellers
LEAF Education - Farmer/EducatorLEAF Education - Farmer/Educator
LEAF Education - CorporateLEAF Education - Corporate
Joint LEAF and LEAF Education - CorporateJoint LEAF and LEAF Education - Corporate
Individual ProducerIndividual Producer
Multisite with QMSMultisite with QMS
Multisite without QMSMultisite without QMS
Equivalence MemberEquivalence Member
Farm Type (Response)
ValueDescription
Not specified
DairyDairy
Cattle and sheep (LFA)Cattle and sheep (LFA)
Cattle and sheep (lowland)Cattle and sheep (lowland)
CerealsCereals
General croppingGeneral cropping
Pigs and poultryPigs and poultry
MixedMixed
HorticultureHorticulture
Other typesOther types
LEAF Marque Membership Status (Response)
ValueDescription
Not Specified
CurrentCurrent
ReopenedReopened
Transfered OutTransfered Out
ClosedClosed
RegisteredRegistered
AppliedApplied
GraceGrace
Transferred InTransferred In

XML

Example Request
GET https://api.leaf.eco/r1/memberships/{membership}.eb HTTP/1.1
Accept: text/xml
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="CharityMembership">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="MembershipGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CharityNumber" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The charity number assigned to the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="MembershipType">
          <xsd:annotation>
            <xsd:documentation>The type of membership</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="Please Select" />
              <xsd:enumeration value="Individual Member" />
              <xsd:enumeration value="Corporate Member" />
              <xsd:enumeration value="College Member" />
              <xsd:enumeration value="Advisor or Consultant" />
              <xsd:enumeration value="Producer Group" />
              <xsd:enumeration value="Non-Paying Agent" />
              <xsd:enumeration value="Green Box Subscriber" />
              <xsd:enumeration value="Friend" />
              <xsd:enumeration value="Industry" />
              <xsd:enumeration value="Non-Member" />
              <xsd:enumeration value="LEAF Marque buyers and sellers" />
              <xsd:enumeration value="LEAF Education - Farmer/Educator" />
              <xsd:enumeration value="LEAF Education - Corporate" />
              <xsd:enumeration value="Joint LEAF and LEAF Education - Corporate" />
              <xsd:enumeration value="Individual Producer" />
              <xsd:enumeration value="Multisite with QMS" />
              <xsd:enumeration value="Multisite without QMS" />
              <xsd:enumeration value="Equivalence Member" />
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="MembershipName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name of the farm, company, organisation or individual associated with the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Address" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The postal address of the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Postcode" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The postcode for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Country" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The country of the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DateJoined" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date on which the member joined LEAF</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="NextRenewal" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date on which the member's next renewal is due</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="EMail" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The email address for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Phone" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The telephone number for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ProducerGroupSize" minOccurs="0" type="xsd:double">
          <xsd:annotation>
            <xsd:documentation>If the membership is a producer group, the number of producers of which it is comprised</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HoldingNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The holding number for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="TotalProductionArea" minOccurs="0" type="xsd:double">
          <xsd:annotation>
            <xsd:documentation>The total production area for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="FarmType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The farm type for the membership</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="">
                <xsd:annotation>
                  <xsd:documentation>Not specified</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="Dairy" />
              <xsd:enumeration value="Cattle and sheep (LFA)" />
              <xsd:enumeration value="Cattle and sheep (lowland)" />
              <xsd:enumeration value="Cereals" />
              <xsd:enumeration value="General cropping" />
              <xsd:enumeration value="Pigs and poultry" />
              <xsd:enumeration value="Mixed" />
              <xsd:enumeration value="Horticulture" />
              <xsd:enumeration value="Other types" />
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="LeafMarqueEquivalenceSchemeName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name of the LEAF Marque equivalence scheme for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LeafMarqueEquivalenceSchemeNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The LEAF Marque equivalence scheme number for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LeafMarqueBaselineSchemeName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name of the LEAF Marque baseline scheme for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LeafMarqueBaselineSchemeNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The LEAF Marque baseline scheme number for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LeafMarqueNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The LEAF Marque number for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LeafMarqueMembershipStatus" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The LEAF Marque membership status for this membership</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="">
                <xsd:annotation>
                  <xsd:documentation>Not Specified</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="Current" />
              <xsd:enumeration value="Reopened" />
              <xsd:enumeration value="Transfered Out" />
              <xsd:enumeration value="Closed" />
              <xsd:enumeration value="Registered" />
              <xsd:enumeration value="Applied" />
              <xsd:enumeration value="Grace" />
              <xsd:enumeration value="Transferred In" />
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="LeafMarqueCertificationBodyName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name of the LEAF Marque Certification Body for this membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LsfrAccess" minOccurs="0" type="xsd:boolean">
          <xsd:annotation>
            <xsd:documentation>Specifies whether the membership currently qualifies for access to the LSFR</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LsfrClientGroups" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The list of assigned LSFR Client Groups for this membership</xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Item" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="ClientGroupName" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The name for the client group.</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="ClientGroupIdentifier" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The unique identifier for the client group.</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Response
HTTP/1.1 200 OK
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<CharityMembership>
  <MembershipGUID>xsd:string</MembershipGUID>
  <CharityNumber>xsd:string</CharityNumber>
  <MembershipType>xsd:string</MembershipType>
  <MembershipName>xsd:string</MembershipName>
  <Address>xsd:string</Address>
  <Postcode>xsd:string</Postcode>
  <Country>xsd:string</Country>
  <DateJoined>xsd:dateTime</DateJoined>
  <NextRenewal>xsd:dateTime</NextRenewal>
  <EMail>xsd:string</EMail>
  <Phone>xsd:string</Phone>
  <ProducerGroupSize>xsd:double</ProducerGroupSize>
  <HoldingNumber>xsd:string</HoldingNumber>
  <TotalProductionArea>xsd:double</TotalProductionArea>
  <FarmType>xsd:string</FarmType>
  <LeafMarqueEquivalenceSchemeName>xsd:string</LeafMarqueEquivalenceSchemeName>
  <LeafMarqueEquivalenceSchemeNumber>xsd:string</LeafMarqueEquivalenceSchemeNumber>
  <LeafMarqueBaselineSchemeName>xsd:string</LeafMarqueBaselineSchemeName>
  <LeafMarqueBaselineSchemeNumber>xsd:string</LeafMarqueBaselineSchemeNumber>
  <LeafMarqueNumber>xsd:string</LeafMarqueNumber>
  <LeafMarqueMembershipStatus>xsd:string</LeafMarqueMembershipStatus>
  <LeafMarqueCertificationBodyName>xsd:string</LeafMarqueCertificationBodyName>
  <LsfrAccess>xsd:boolean</LsfrAccess>
  <LsfrClientGroups>
    <Item>
      <ClientGroupName>xsd:string</ClientGroupName>
      <ClientGroupIdentifier>xsd:string</ClientGroupIdentifier>
    </Item>...</LsfrClientGroups>
</CharityMembership>

JSON

Example Request
GET https://api.leaf.eco/r1/memberships/{membership}.eb HTTP/1.1
Accept: application/json
Example Response
HTTP/1.1 200 OK
Content-Type: application/json

{"MembershipGUID":String,
  "CharityNumber":String,
  "MembershipType":String,
  "MembershipName":String,
  "Address":String,
  "Postcode":String,
  "Country":String,
  "DateJoined":String,
  "NextRenewal":String,
  "EMail":String,
  "Phone":String,
  "ProducerGroupSize":Number,
  "HoldingNumber":String,
  "TotalProductionArea":Number,
  "FarmType":String,
  "LeafMarqueEquivalenceSchemeName":String,
  "LeafMarqueEquivalenceSchemeNumber":String,
  "LeafMarqueBaselineSchemeName":String,
  "LeafMarqueBaselineSchemeNumber":String,
  "LeafMarqueNumber":String,
  "LeafMarqueMembershipStatus":String,
  "LeafMarqueCertificationBodyName":String,
  "LsfrAccess":Boolean,
  "LsfrClientGroups":[{"ClientGroupName":String,
      "ClientGroupIdentifier":String},
    ...]}

Update Membership Details PUT

Updates the details associated with a specific LEAF charity membership

Parameters

Request Parameters
ParameterNameTypeDescription
TotalProductionAreaTotal Production AreaNumberThe total production area for the membership

XML

Request Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="CharityMembership">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="TotalProductionArea" type="xsd:double">
          <xsd:annotation>
            <xsd:documentation>The total production area for the membership</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Request
PUT https://api.leaf.eco/r1/memberships/{membership}.eb HTTP/1.1
Content-Type: text/xml; charset=utf-8

			<?xml version="1.0" encoding="utf-8"?>
<CharityMembership>
  <TotalProductionArea>xsd:double</TotalProductionArea>
</CharityMembership>
Example Response
HTTP/1.1 204 No Content

JSON

Example Request
PUT https://api.leaf.eco/r1/memberships/{membership}.eb HTTP/1.1
Content-Type: application/json; charset=utf-8

			{"TotalProductionArea":Number}
Example Response
HTTP/1.1 204 No Content

Status Codes

Status and Error Codes
HTTP StatusError CodeDescription
204 

Profile was updated successfully

400DataError:TotalProductionArea:CompatibilityRule

Enter as digits only, optionally including a decimal point '.'

400DataError:TotalProductionArea:LimitRule

Area must be greater than one hectare

400DataError:TotalProductionArea:RequiredRule

Production area is required

400ProfileReadOnly

The user is not permitted to make changes to the membership profile

Currently only the total farm area may be updated via the API. All other values are editable via myLEAF.